#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	float num1 = 0;
	scanf("%f", &num1);
	int num3 = num1;
	while (num1 >= 10)
	{
		num1 /= 10;
		printf("%f\n", num1);
	}
	while (num1 <= num3)
	{
		int num2 = num1;
		printf("%d\n", num2 % 10);
		
		num1 = num1 * 10;


	}


}